<template>
  <el-container>
    <el-main>
      <el-button type="primary" style="float: left">添加信息</el-button>
      <el-table :data="phoneList">
        <el-table-column label="手机id" prop="phone_id"></el-table-column>
        <el-table-column label="品牌" prop="phone_brand"></el-table-column>
        <el-table-column label="系列" prop="phone_series"></el-table-column>
        <el-table-column label="型号" prop="phone_type"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button type="primary" size="small">修改</el-button>
            <el-button type="danger" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-main>
  </el-container>
</template>

<script>
import axios from "axios";

export default {
  name: "Product",
  data() {
    return {
      phoneList: [],
    }
  },
  methods: {

  },
  created() {
    axios.post("api/admin/selectAllProduct",null).then((res)=>{
      console.log(res.data);
      this.phoneList = res.data;
    })
  }
}
</script>

<style scoped>

</style>
